<?php
namespace Admin\Model;
use Think\Model;
class RentModel extends Model{
    protected $_validate = array(
        array('title','require','请填写标题！',1), //默认情况下用正则进行验证
        array('content','require','请填写正文内容！',2), 
    );
    protected $_auto = array ( 
        array("createtime","time",1,"function"),
        array('user_id','getUid',1,'callback'), 
    );
    protected function getUid(){
    	return session('adminId');
    }
}